<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/system/include/common.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>流程部署</title>
<link rel="stylesheet" type="text/css" href="${jsAndCss}/css/style.css" />
<link rel="stylesheet" type="text/css"
	href="${jsAndCss}/css/WdatePicker.css" />
<link rel="stylesheet" type="text/css"
	href="${jsAndCss}/css/skin_/table.css" />
<link rel="stylesheet" type="text/css"
	href="${jsAndCss}/css/jquery.grid.css" />
<script type="text/javascript" src="${jsAndCss}/js/jquery.js"></script>	
</head>
<body>

  <div id="container">
	<div id="hd"></div>
	<div id="bd">
		<div id="main">
			<h2 class="subfild">
				<span>请假申请</span>
			</h2>
			<div class="subfild-content base-info">
				<form id="" action="${ctx }/updateUser">
					<input id="id" name="userId" value="${user.userId }" type="hidden">
					
					<div class="kv-item ue-clear">
						<label><span class="impInfo">*</span>用户名</label>
						<div class="kv-item-content">
							<input type="text" name="userName" value="${user.userName }" placeholder="用户名"
								style="width: 180px" />
						</div>
						<span class="kv-item-tip"></span>
					</div>
					<!-- <div class="kv-item ue-clear">
						<label><span class="impInfo">*</span>所属部门</label>
						<div class="kv-item-content">
							<input type="text" name="deptName" value="" placeholder="部门名"
								style="width: 180px" />
						</div>
						<span class="kv-item-tip"></span>
					</div> -->					
					<div class="kv-item ue-clear">
						<label><span class="impInfo">*</span>所属部门</label>
						<div class="kv-item-content">
							<select name="deptName">
								<c:forEach items="${deptList }" var="dept">								
									
									<c:choose>
					                   <c:when test="${dept.deptId == user.deptId }">
					                   	<option selected>${dept.deptId}、${dept.deptName}</option>
					                   </c:when>
					                   <c:otherwise>
					                   	<option>${dept.deptId}、${dept.deptName}</option>
					                   </c:otherwise>
									</c:choose>
								</c:forEach>
							</select>
						</div>
						<span class="kv-item-tip"></span>
					</div>
					<div class="kv-item ue-clear">
						<label><span class="impInfo">*</span>操作授权</label>
						<div class="kv-item-content">
							<c:forEach items="${roleList }" var="role">
								<c:choose>
					                   <c:when test="${fn:contains(roleIds,role.roleId) }">
					                   	<input type="checkBox" checked name="roleIds" onchange="javascript:change($(this))" value="${role.roleId }" />${role.roleName }
					                   </c:when>
					                   <c:otherwise>
					                   	<input type="checkBox" onchange="javascript:change($(this))" value="${role.roleId }" />${role.roleName }
					                   </c:otherwise>
								</c:choose>
								
							</c:forEach>	
														
						</div>
						<span class="kv-item-tip"></span>
					</div>
					
					<div class="buttons">
						<input id="btnSubmit" class="button" type="submit" value="确认" />
						<a href="${ctx }/userList"><input class="button_cancel" type="button" value="取消" /></a>
					</div>
					
				</form>
				<!-- <div class="kv-item ue-clear time">
                	<label><span class="impInfo">*</span>发布时间</label>
                	<div class="kv-item-content">
                    	<input type="text" placeholder="文章标题" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" />
                        <i class="time-icon"></i>
                    </div>
                    <span class="kv-item-tip error">这是一个错误信息</span>
                </div> 
                
                <div class="kv-item ue-clear">
                	<label>所在栏目</label>
                	<div class="kv-item-content">
                    	<select>
                        	<option>新闻资讯</option>
                            <option>新闻资讯</option>
                            <option>新闻资讯</option>
                        </select>
                    </div>
                    <span class="kv-item-tip success">成功信息</span>
                </div>
                
                <div class="kv-item ue-clear">
                	<label>是否审核</label>
                	<div class="kv-item-content">
                    	<span class="choose">
                            <span class="checkboxouter">
                                <input type="radio" name="need" />
                                <span class="radio"></span>
                            </span>
                            <span class="text">是</span>
                        </span>
                    	<span class="choose">
                            <span class="checkboxouter">
                                <input type="radio" name="need" />
                                <span class="radio"></span>
                            </span>
                            <span class="text">否</span>
                        </span>
                        
                    </div>
                    <span class="kv-item-tip">标题字数限制在35个字符</span>
                </div>
                
                
                <div class="kv-item ue-clear">
                	<label><span class="impInfo">*</span>缩略图</label>
                	<div class="kv-item-content file">
						<span class="text"></span>
                        <input type="file" />
                        <input type="button" class="button normal long2" value="浏览.." />
                    </div>
                    <span class="kv-item-tip">标题字数限制在35个字符</span>
                </div>
            </div>
            
            <h2 class="subfild">
            	<span>备注资料</span>
            </h2>
            
            <div class="subfild-content remarkes-info">
            	<div class="kv-item ue-clear">
                	<label><span class="impInfo">*</span>文章内容</label>
                	<div class="kv-item-content">
                    	<textarea placeholder="文章内容" id="content" style="width:800px;height:240px;"></textarea>
                    </div>
                </div>
            </div>
            
            <div class="buttons">
                <input class="button" type="button" value="确认修改" />
            </div>-->
			</div>
		</div>
	</div>
</div>
<script>
function change(obj){
	/* obj.attr("name","roleName"); */ 
	 if(obj.attr("name")==undefined){
		 obj.attr("name","roleIds");
	}else{
		obj.removeAttr("name");
	} ;
};



</script>
</body>
	
